package designpatterns.strategy;

/**
 * @author miweidong
 * @date 2021-07-28 15:14
 */
public class Context {

    private IConsume consume;

    public Context(Integer type) {
        this.consume = UserFactory.getInstance().creator(type);
    }

    public Double payment(Double money) {
        return consume.payMent(money);
    }
}
